package com.Enum;

/**
 * 好友申请状态
 * @author licl
 *
 */
public enum FriendsApplyState {
	Applied(1, "已申请"),
	Agreed(4, "已同意"),
	Refused(7, "已拒绝"),
	Deleted(10, "已删除");

	private final int val;
	private final String desc;
	
	FriendsApplyState(int val, String desc){
		this.val = val;
		this.desc = desc;
	}
	
	public int getIntValue(){
		return val;
	}
	
	public String toString(){
		return desc;
	}
	
	public static FriendsApplyState getByIntValue(int v){
		switch(v){
			case 1:
				return Applied;
			case 4:
				return Agreed;
			case 7:
				return Refused;
			case 10:
				return Deleted;
			default:
				return null;
		}
	}
}
